package com.fsoft.manager.user.entity;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import com.fsoft.core.Global;
import com.fsoft.core.common.base.entity.BaseVo;
import com.fsoft.core.utils.OgnlUtils;

/**
 * @package com.fsoft.manager.user.entity
 * @author fish
 * @email it.fish2010@foxmail.com
 * @date 2021-09-24
 * @desc 帐号信息
 */
public class SysUser extends BaseVo {
	private String loginAcct;
	private String loginPwd;
	private String email;
	private String mobile;

	/** 加锁属性 */
	private Integer isLock;
	private Integer lockType;
	private String lockTypeName;
	private Timestamp lockTime;

	private String areaId;
	private String areaName;

	private String deptId;
	private String deptName;
	private String location;

	private String orgName;
	// 默认皮肤;保存在用户信息中
	private String theme;

	/** 头像图片地址 */
	private String imgPath;

	private List<String> roleIdList = new ArrayList<String>();

	public String getLoginAcct() {
		return loginAcct;
	}

	public void setLoginAcct(String loginAcct) {
		this.loginAcct = loginAcct;
	}

	public String getLoginPwd() {
		return loginPwd;
	}

	public void setLoginPwd(String loginPwd) {
		this.loginPwd = loginPwd;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public Integer getIsLock() {
		return isLock;
	}

	public void setIsLock(Integer isLock) {
		this.isLock = isLock;
	}

	public Integer getLockType() {
		return lockType;
	}

	public void setLockType(Integer lockType) {
		this.lockType = lockType;
	}

	public String getLockTypeName() {
		if (OgnlUtils.isEmptyZero(getLockType())) {
			this.lockTypeName = "手工加锁";
		} else if (getLockType().compareTo(Global.LOCK_TYPE_LOGINTIMES) == 0) {
			this.lockTypeName = "登录次数超限制";
		} else if (getLockType().compareTo(Global.LOCK_TYPE_PASSWORDTIMES) == 0) {
			this.lockTypeName = "校验密码次数超限制";
		} else if (getLockType().compareTo(Global.LOCK_TYPE_PASSWORDOVERTIME) == 0) {
			this.lockTypeName = "密码过期";
		} else if (getLockType().compareTo(Global.LOCK_TYPE_NEVERLOGIN) == 0) {
			this.lockTypeName = "长期未登录";
		} else if (getLockType().intValue() == 9) {
			this.lockTypeName = "系统自动加锁";
		}
		return lockTypeName;
	}

	public Timestamp getLockTime() {
		return lockTime;
	}

	public void setLockTime(Timestamp lockTime) {
		this.lockTime = lockTime;
	}

	public String getAreaId() {
		return areaId;
	}

	public void setAreaId(String areaId) {
		this.areaId = areaId;
	}

	public String getAreaName() {
		return areaName;
	}

	public void setAreaName(String areaName) {
		this.areaName = areaName;
	}

	public String getOrgName() {
		return orgName;
	}

	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}

	public String getTheme() {
		return theme;
	}

	public void setTheme(String theme) {
		this.theme = theme;
	}

	public String getImgPath() {
		return imgPath;
	}

	public void setImgPath(String imgPath) {
		this.imgPath = imgPath;
	}

	public List<String> getRoleIdList() {
		return roleIdList;
	}

	public void setRoleIdList(List<String> roleIdList) {
		this.roleIdList = roleIdList;
	}

	public void addRoleId(String roleId) {
		this.roleIdList.add(roleId);
	}

	public String getDeptId() {
		return deptId;
	}

	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}

	public String getDeptName() {
		return deptName;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

}